package com.cater.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.cater.query.CommonQuery;

public interface BaseDao<T, PK, Q> {
	List<T> getAll();
	
	List<T> getAllCommon(@Param("qo") CommonQuery commonQuery);

	int save(T t);

	int delete(PK id);

	void update(T t);

	T getById(PK id);

	int findCount(@Param("qo") Q query);

	List<T> findList(@Param("qo") Q query, @Param("first") int first, @Param("max") int max);

}
